<template>
  <div class="goods-list">
    <goods-list-item v-for="(item, index) in goodsList"
                     :item="item"
                     :key="index"/>
  </div>
</template>

<script>
  import GoodsListItem from "@/components/common/goods-list/GoodsListItem.vue"
  
  export default {
    name: "GoodsList",
    props: {
      goodsList: {
        type: Array,
        default() {
          return [];
        }
      }
    },
    components: {
      GoodsListItem,
    }
  }
</script>

<style scoped>
  .goods-list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;/*允许弹性盒子元素自动换行*/
    justify-content: space-between;
    padding: 10px;
    align-items: center; /*弹性盒子元素在弹性盒子每行的纵轴对齐方式*/
  }
</style>
